﻿<!doctype html>
<html class="no-js">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="description" content="">
  <meta name="keywords" content="">
  <meta name="viewport"
        content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <title>更新用户信息 </title>

  <!-- Set render engine for 360 browser -->
  <meta name="renderer" content="webkit">

  <!-- No Baidu Siteapp-->
  <meta http-equiv="Cache-Control" content="no-siteapp"/>

  <link rel="icon" type="image/png" href="assets/i/favicon.png">

  <!-- Add to homescreen for Chrome on Android -->
  <meta name="mobile-web-app-capable" content="yes">
  <link rel="icon" sizes="192x192" href="assets/i/app-icon72x72@2x.png">

  <!-- Add to homescreen for Safari on iOS -->
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="apple-mobile-web-app-title" content="Amaze UI"/>
  <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">

  <!-- Tile icon for Win8 (144x144 + tile color) -->
  <meta name="msapplication-TileImage" content="assets/i/app-icon72x72@2x.png">
  <meta name="msapplication-TileColor" content="#0e90d2">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <script src="assets/js/jquery.min.js"></script>
  <script src="assets/js/baiduTemplate.js"></script>
    <script src="assets/js/amazeui.js"></script>
    
  <link rel="stylesheet" href="assets/css/amazeui.min.css">

	 <script src="assets/js/PublicFunction.js"></script>
 



</head>
<body>

<div id="parent" >
			
	
	
	<div class="am-g" style="font-size:13px;margin:auto auto; padding-top: 20px; width: 100%;">
	 
		<div class="am-u-md-8 am-u-sm-centered" id="input_from">
		
						
		<div style="width:140px;height:140px;  margin: 10px auto;  display: none; " id ="img_div">
						 		
			 <img  alt="140*140" id ="img" src="" width="140" height="140" />
						 		
		</div>
		
		<div style="width: 70px; margin: auto auto; text-align: center;"  >	 	 
				<button type="button" class="am-btn am-btn-primary" data-am-modal="{target: '#my-alert'}"> 上传到货单</button>
		 </div>				 
						 
				
		<P><button type="button" class="am-btn am-btn-secondary am-btn-block am-radius" onClick="actuator('addPhotographArr()')" >提交</button></P>
			
		<input class="am-form-field am-input-sm" type="hidden" id = "img_name" name = "img_name" value="">
		
			

		</div>		
	</div>
</div>	

	


<div class="am-modal am-modal-alert" tabindex="-1" id="my-alert" title="-1">
  <div class="am-modal-dialog">
    <div class="am-modal-bd">
   		 <button type="button" class="am-btn am-btn-default am-radius" onclick="gotoPhoto('1','1')">拍照</button>
   	 	 <button type="button" class="am-btn am-btn-default am-radius" onclick="getPhoto('1','1')">选择相册</button>
  
						
    </div>
    <div class="am-modal-footer">
      <span class="am-modal-btn" id ="close_select">关闭</span>
    </div>
  </div>
</div>





<script type="text/javascript">
<!--页面初始化-->
function init(w ,h) {
	 
	$('#my-alert').on('closed.modal.amui', function(){
		  $("#my-alert").attr("title","-1");
		});
	$('#my-alert').on('opened.modal.amui', function(){
		  $("#my-alert").attr("title","1");  
		});
	

	
	
	
  };

  

//设置头像
function setimg(imgs){
	$("#close_select").click();
	if(imgs==null||imgs.length<=0){
		return;
	}
	$("#img").attr("src",imgs);
	$("#img_name").attr("value",imgs);
	$("#img_div").css("display","");

	
}
//按返回键的操作
function onBackPressed(){
	var isopen = $("#my-alert").attr("title");
	if(isopen == "1"){
		$("#close_select").click();
	}
	else{
		Public_method.finishActivity();
	}
	
}

function addPhotographArr(){
	var img_name =$("#img_name").val();
	PhotographArrFunction.addPhotographArr(img_name);
}


</script>
</body>
</html>
